#ifndef RSIM_PRESCRIBEDMOTION_H
#define RSIM_PRESCRIBEDMOTION_H

/* -------------------------------------------------------------------------- *
 * File: PrescribedMotion.h                                                   *
 * Authors: Kishor Bhalerao                                                   *
 * Email : kishor8dm@gmail.com                                                *
 * Contributors:                                                              *
 * Email:                                                                     *
 * copyright (c) 2010 Authors.                                                *
 *                                                                            *
 * This program is free software: you can redistribute it and/or modify it    *
 * under the terms of the GNU General Public License as published by the Free *
 * Software Foundation, either version 3 of the License, or any later version.*
 *                                                                            *
 * This program is distributed in the hope that it will be useful, but        *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   *
 * for more details. (http://www.gnu.org/licenses/)                           *
 * -------------------------------------------------------------------------- */

#include <iostream>
using namespace std;

namespace RSIM{

/** 
Base class for prescribed motion. The functions setQ, setU and setUDot are given
a writable pointer to the joints state cache. The derived class must ensure that only
the legal indices of the state cache are written over. 
*/
class PrescribedMotion{
        public:
                /** Specify Q's of the joint */
                virtual void setQ(double *Q)const = 0;
                
                /** Specify U's of the joint. 
                1. Free joint: 	U's (0,1,2) are the components of relative angular velocity with respect to parent expresed
                                in M frame of the Parent.
                2. Spherical joint: Case is similar to that of Free joint.
                */
                virtual void setU(double *U)const = 0;
                
                /** Udot = dot{u} */
                virtual void setUDot(double *Udot)const = 0;
                
}; // class PrescribedMotion

} // namespace RSIM
#endif